agents
Class BayesianAgentForAuction

java.lang.Object
  extended by negotiator.Agent
      extended by agents.BayesianAgentForAuction
Direct Known Subclasses:
BayesianAgentForAuctionMultiPhase

public class BayesianAgentForAuction
extends Agent

Wrapper for opponentmodelspace, so that it is a neat utilityspace that we can give to the bidspace.

Author:
wouter

Nested Class Summary
protected static class BayesianAgentForAuction.ACTIONTYPE
           
static class BayesianAgentForAuction.PHASE
           
protected static class BayesianAgentForAuction.ROLE
           
 
Field Summary
protected  double CONCESSIONFACTOR
           
protected  OpponentModel fOpponentModel
           
protected  OpponentModel[] fOpponentModels
           
protected  Bid fOpponentPreviousBid
           
protected  BayesianAgentForAuction.PHASE fPhase
           
protected  BayesianAgentForAuction.ROLE fRole
           
protected  int fSmartSteps
           
protected  Action messageOpponent
           
protected  Action myLastAction
           
protected  Bid myLastBid
           
protected  java.util.ArrayList<Bid> myPreviousBids
           
protected static int NUMBER_OF_SMART_STEPS
           
 
Fields inherited from class negotiator.Agent
fNegotiation, parametervalues, sessionNr, sessionsTotal, startTime, strategyParameters, timeline, totalTime, utilitySpace
 
Constructor Summary
BayesianAgentForAuction()
           
 
Method Summary
 Action chooseAction()
          this function is called after ReceiveMessage, with an Offer-action.
protected  BayesianAgentForAuction.ACTIONTYPE getActionType(Action lAction)
           
 Bid getMaxUtilityBid()
           
protected  Bid getNextBidAuction(Bid pOppntBid)
           
protected  Bid getNextBidSmart(Bid pOppntBid)
           
 double getOpponentUtility(Bid bid)
           
static java.util.ArrayList<AgentParam> getParameters()
          Dummy variables, for testing only.
protected  Bid getSmartBid(Bid pBid)
          Wouter: Try to find a bid that has same utility for ourself but max utility for opponent.
protected  Bid getTradeOff(double pUtility)
           
static java.lang.String getVersion()
           
 void init()
          This method is called by the protocol every time before starting a new session after the internalInit method is called.
protected  double Paccept(double u, double t1)
          This function determines the accept probability for an offer.
protected  void prepareOpponentModel()
           
protected  Action proposeInitialBid()
           
protected  Bid proposeNextBid(Bid pOppntBid)
           
 void ReceiveMessage(Action opponentAction)
          informs you which action the opponent did
 
Methods inherited from class negotiator.Agent
endSession, getAgentID, getName, getParameterValues, getSessionNumber, getSessionsTotal, getStrategyParameters, getUniqueIdentifier, getUtility, internalInit, isUIAgent, loadSessionData, parseStrategyParameters, restartDataObjectsFolder, saveSessionData, setAgentID, setName, sleep
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

messageOpponent

protected Action messageOpponent

myLastBid

protected Bid myLastBid

myLastAction

protected Action myLastAction

fOpponentPreviousBid

protected Bid fOpponentPreviousBid

fSmartSteps

protected int fSmartSteps

fOpponentModel

protected OpponentModel fOpponentModel

fOpponentModels

protected OpponentModel[] fOpponentModels

CONCESSIONFACTOR

protected double CONCESSIONFACTOR

NUMBER_OF_SMART_STEPS

protected static final int NUMBER_OF_SMART_STEPS
See Also:
Constant Field Values

myPreviousBids

protected java.util.ArrayList<Bid> myPreviousBids

fPhase

protected BayesianAgentForAuction.PHASE fPhase

fRole

protected BayesianAgentForAuction.ROLE fRole
Constructor Detail

BayesianAgentForAuction

public BayesianAgentForAuction()
Method Detail

getVersion

public static java.lang.String getVersion()

getParameters

public static java.util.ArrayList<AgentParam> getParameters()
Dummy variables, for testing only. W.Pasman 19aug08


init

public void init()
Description copied from class: Agent
This method is called by the protocol every time before starting a new session after the internalInit method is called. User can override this method.

Overrides:
init in class Agent

prepareOpponentModel

protected void prepareOpponentModel()

ReceiveMessage

public void ReceiveMessage(Action opponentAction)
Description copied from class: Agent
informs you which action the opponent did

Overrides:
ReceiveMessage in class Agent

proposeInitialBid

protected Action proposeInitialBid()
                            throws java.lang.Exception
Throws:
java.lang.Exception

getNextBidAuction

protected Bid getNextBidAuction(Bid pOppntBid)
                         throws java.lang.Exception
Parameters:
pOppntBid -
Returns:
a counterbid that has max util for us and an opponent utility that is equal to 1-estimated utility of opponent's last bid. Or, if that bid was done already before, another bid that has same utility in our space as that counterbid.
Throws:
java.lang.Exception

getSmartBid

protected Bid getSmartBid(Bid pBid)
                   throws java.lang.Exception
Wouter: Try to find a bid that has same utility for ourself but max utility for opponent.

Parameters:
pBid -
Returns:
Throws:
java.lang.Exception

getNextBidSmart

protected Bid getNextBidSmart(Bid pOppntBid)
                       throws java.lang.Exception
Throws:
java.lang.Exception

getTradeOff

protected Bid getTradeOff(double pUtility)
                   throws java.lang.Exception
Throws:
java.lang.Exception

proposeNextBid

protected Bid proposeNextBid(Bid pOppntBid)
                      throws java.lang.Exception
Throws:
java.lang.Exception

getOpponentUtility

public double getOpponentUtility(Bid bid)
                          throws java.lang.Exception
Throws:
java.lang.Exception

chooseAction

public Action chooseAction()
Description copied from class: Agent
this function is called after ReceiveMessage, with an Offer-action.

Specified by:
chooseAction in class Agent
Returns:
(should return) the bid-action the agent wants to make.

getActionType

protected BayesianAgentForAuction.ACTIONTYPE getActionType(Action lAction)

Paccept

protected double Paccept(double u,
                         double t1)
                  throws java.lang.Exception
This function determines the accept probability for an offer. At t=0 it will prefer high-utility offers. As t gets closer to 1, it will accept lower utility offers with increasing probability. it will never accept offers with utility 0.

Parameters:
u - is the utility
t - is the time as fraction of the total available time (t=0 at start, and t=1 at end time)
Returns:
the probability of an accept at time t
Throws:
java.lang.Exception - if you use wrong values for u or t.

getMaxUtilityBid

public final Bid getMaxUtilityBid()
                           throws java.lang.Exception
Throws:
java.lang.Exception